package com.zh.onlineexam.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

@TableName("t_user")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class User implements Serializable {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String userUuid;
    private String userName;
    private String password;
    private String realName;
    private Integer age;
    private Integer sex;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthDay;
    private Integer userLevel;
    private String phone;
    private Integer role;
    private Integer status;
    private String imagePath;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date modifyTime;
    private Date lastActiveTime;
    private Integer deleted;
    private String wxOpenId;

    public User(Integer id) {
        this.id = id;
    }
}
